<?php
use yii\widgets\LinkPager;
use yii\helpers\Url;
?>
<center>
	<table border="2">
    <tr>
    	<td>编号</td>
		<td>名称</td>
		<td>价格</td>
		<td>库存</td>
		<td>图片示例</td>
		<td>操作</td>
	</tr><br/>
<?php foreach ($models as $key => $value) {?>
	<tr>
		<td><?php echo $value['id'] ?></td>
		<td><?php echo $value['name'] ?></td>
		<td><?php echo $value['price'] ?></td>
		<td><?php echo $value['stock'] ?></td>
		<td><img src="<?php echo $value['path']?>" alt="" width="50" heigth="50"></td>
		<td><a href="<?php echo Url::toRoute(['goods/del','id'=>$value['id']]);?>">删除</a>||<a href="">修改</a></td>
	</tr><br/>



<?php } ?>
</table>

<?php
// 显示分页
echo LinkPager::widget([
    'pagination' => $pages,
]);

?>
</center>
